<template>
  <view>
    <view class="flex flex-col justify-center items-center" @click="reloadClick">
      <view class="w-[30vw]">
        <u-image mode="widthFix" :src="url"></u-image>
      </view>
      <text class="mt-3 text-xs text-gray-500">{{ text }}</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {}
    },
    props: {
      url: {
        type: String,
        default: '/static/dddr102.png'
      },
      text: {
        type: String,
        default: '暂无数据~'
      }
    },

    methods: {
      reloadClick() {
        this.$emit('reload')
      }
    }
  }
</script>
<style lang="scss" scoped>
  ::v-deep u-image view,
  u-image,
  .u-image {
    width: 100% !important;
    height: 100% !important;
    flex-grow: 1 !important;
  }
</style>
